package com.example.redis.collection;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Console;

import java.util.List;
import java.util.stream.Collectors;

public class FilterTest {
    public static void main(String[] args) {
        List<Integer> list1=CollUtil.newArrayList();
        for (int i = 0; i < 100; i++) {
            list1.add(i);
        }
        List<Integer> list2=CollUtil.newArrayList();
        for (int i = 80; i < 100; i++) {
            list2.add(i);
        }
        List<Integer> list3=CollUtil.newArrayList();
        for (int i = 30; i < 70; i++) {
            list2.add(i);
        }
        List<Integer> collect = list1.stream().filter(x ->
            !list2.contains(x)).collect(Collectors.toList());
        Console.log(collect);
    }
}
